package main

import (
	"context"
	"fmt"
	"github.com/asim/go-micro/plugins/registry/etcd/v3"
	"github.com/asim/go-micro/v3/client"
	"github.com/asim/go-micro/v3/registry"
	"go-learn/test/microTest/pb"
)

func main() {
	etcdReg := etcd.NewRegistry(
		registry.Addrs("192.168.197.121:2379"),
	)

	client := pb.NewSearchService("test", client.NewClient(client.Registry(etcdReg)))
	response, err := client.Search(context.Background(), &pb.SearchRequest{Id: 1})
	if err != nil {
		fmt.Println(err)
	}
	fmt.Println(response)
}
